using micromsg;
using MicroMsg.Common.Event;
using MicroMsg.Common.Utils;
using MicroMsg.Protocol;
using System;
using System.Collections.Generic;
namespace MicroMsg.Scene
{
	public class NetSceneSendInviteEmail : NetSceneBaseEx<SendInviteEmailRequest, SendInviteEmailResponse, SendInviteEmailRequest.Builder>
	{
		private const string TAG = "NetSceneSendInviteEmail";
		public bool doScene(List<uint> qqList)
		{
			base.beginBuilder();
			this.mBuilder.BaseRequest = NetSceneBase.makeBaseRequest(41);
			using (List<uint>.Enumerator enumerator = qqList.GetEnumerator())
			{
				while (enumerator.MoveNext())
				{
					uint current = enumerator.get_Current();
					this.mBuilder.UinListList.Add(current);
				}
			}
			this.mBuilder.UinCount = (uint)qqList.get_Count();
			this.mSessionPack.mCmdID = 41;
			base.endBuilder();
			return true;
		}
		protected override void onFailed(SendInviteEmailRequest request, SendInviteEmailResponse response)
		{
			Log.smethod_1("NetSceneSendInviteEmail", "send SendInviteEmailRequest failed");
			EventCenter.postEvent(EventConst.ON_NETSCENE_SENDINVITEMAIL_ERR, null, null);
		}
		protected override void onSuccess(SendInviteEmailRequest request, SendInviteEmailResponse response)
		{
			RetConst ret = (RetConst)response.BaseResponse.Ret;
			if (ret != RetConst.MM_OK)
			{
				Log.smethod_1("NetSceneSendInviteEmail", "send SendInviteEmailRequest failed ret =" + ret);
				EventCenter.postEvent(EventConst.ON_NETSCENE_SENDINVITEMAIL_ERR, null, null);
				return;
			}
			EventCenter.postEvent(EventConst.ON_NETSCENE_SENDINVITEMAIL_SUCCESS, null, null);
		}
	}
}
